package top.lixunda.ecommerce.server.user.api.entity.db;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 员工表，主要用于管理系统创建的子账户绑定
 *
 * @author Lixunda
 * @since 2020-04-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("staff")
@ApiModel(value = "StaffDO对象", description = "员工表，主要用于管理系统创建的子账户绑定")
public class StaffDO extends Model<StaffDO> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "唯一主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "用户账户编号")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty(value = "用户名称")
    @TableField("user_type")
    private String userType;

    @ApiModelProperty(value = "系统类型，如 ADMIN 和 STORE")
    @TableField("system_type")
    private String systemType;

    @ApiModelProperty(value = "系统账号，当为店铺时表示店铺编号")
    @TableField("system_id")
    private Integer systemId;

    @ApiModelProperty(value = "系统名称，当为店铺时表示店铺名称")
    @TableField("system_name")
    private String systemName;

    @ApiModelProperty(value = "创建模式，自动创建和手动创建")
    @TableField("create_mode")
    private String createMode;

    @ApiModelProperty(value = "修改标志，是否可以修改数据")
    @TableField("change_flag")
    private Integer changeFlag;

    @ApiModelProperty(value = "创建人员编号")
    @TableField("create_user_id")
    private Integer createUserId;

    @ApiModelProperty(value = "创建人员名称")
    @TableField("create_user_name")
    private String createUserName;

    @ApiModelProperty(value = "创建人员类型")
    @TableField("create_user_type")
    private String createUserType;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "删除人员编号")
    @TableField("remove_user_id")
    private Integer removeUserId;

    @ApiModelProperty(value = "删除人员名称")
    @TableField("remove_user_name")
    private String removeUserName;

    @ApiModelProperty(value = "删除人员类型")
    @TableField("remove_user_type")
    private String removeUserType;

    @ApiModelProperty(value = "删除数据")
    @TableField("remove_time")
    private LocalDateTime removeTime;

    @ApiModelProperty(value = "逻辑删除字段")
    @TableField("usable")
    private Integer usable;

    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
